/**
 * 
 */
package org.codesketch.controller.service;

import java.util.Set;

import org.codesketch.controller.domain.Test;

/**
 * @author Quirno Brizi
 *
 */
public interface ScheduleService {
	/**
	 * Schedule a new task.
	 * @param task the task identifier.
	 * @return the scheduled test.
	 */
	Test schedule(final Long task);
	/**
	 * Cancel a running or scheduled test.
	 * @param test the test identifier.
	 * @return the canceled test.
	 */
	Test cancel(final String test);
	/**
	 * Return a {@link Set} containing all the scheduled 
	 * and running test.
	 * @return a set of {@link Test}
	 */
	Set<Test> scheduled();
}
